﻿<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<div class="header">
    <div class="header_top">
      <div class="top_nav"><a href="index">首页</a><a href="temp/about.jsp" target="_Blank">联系我们</a></div>
      <c:choose>
      	<c:when test="${sessionScope.user != null}">
      		<input type="hidden" id="hid_user_no" value="${sessionScope.user.id }" />
      		<div class="top_user">欢迎您，<c:choose><c:when test="${not empty sessionScope.user.username}">${sessionScope.user.username}</c:when><c:otherwise>${sessionScope.user.msisdn}</c:otherwise></c:choose><a href="userLogin_logout.action" >[退出]</a>|<a href="temp/about.jsp" target="_Blank">用户中心</a>|<a href="cartUser_index.action" target="_Blank">我的购物车(<span id="headCartLen" class="clrb"></span>)</a>|<a href="temp/about.jsp" target="_Blank">消息(<span class="clrb"></span>)</a></div>
      	</c:when>
      	<c:otherwise>
	      	<div class="top_user"><a href="toUserLogin.action">登录</a>|<a href="toUserRegister.action">注册</a></div>
      	</c:otherwise>
      </c:choose>
    </div>
    <div class="header_con">
      <div class="header_opacity">
        <div class="header_logo"></div>
        <c:if test="${sessionScope.user.userRole eq 'admin'}">
        	<div class="header_nav"> <a href="adminIndex_index.action">订单管理</a> <a href="userIndex_list.action" >商品管理</a> <a href="toAdd.action" target="_Blank">添加商品</a></div>
        </c:if>
        <c:if test="${sessionScope.user.userRole eq 'user'}">
        	<div class="header_nav"> <a href="userIndex_list.action">餐厅首页</a> <a href="cartUser_index.action" target="_Blank">我的购物车</a> </div>
        </c:if>
      </div>
	</div>
</div>
<script type="text/javascript" src="ipiinclude/ipijs/common/jquery.js"></script>
<script type="text/javascript" src="ipiinclude/ipijs/common/head.js"></script>